/* t_common.cpp : test dgnsc common
 * Copyright (C) 2009-2010 drangon <drangon.zhou@gmail.com>
 * 2009-05
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <dgnsc/common.h>

#include "gtest.h"

#include <stdio.h>

#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif

#if 0
TEST( common, common )
{
	printf( "dgnsc version : [%s]\n", dgn_version() );

	dgn_init( NULL );
	PR_DEBUG( "123" );
	PR_DEBUG( "%d : [%s]", 123, "haha" );
	dgn_fini();

	dgn_init( "a.log" );
	PR_DEBUG( "123" );
	PR_DEBUG( "%d : [%s]", 123, "haha" );

	// set time to 23:59:40, test change log file
	int i;
//	for( i = 0; i < 20; i++ ) {
	for( i = 20; i < 20; i++ ) {
		PR_DEBUG( "test [%d]", i );
#ifdef _WIN32
		Sleep( 3000 );
#else
		sleep( 3 );
#endif
	}

	dgn_fini();

	PR_DEBUG( "END not show" );

	printf( "dgnsc version : [%s]\n", dgn_version() );
}
#endif // if 0

